package org.momo.rpc.retry;


import org.momo.rpc.extention.SPI;
import org.momo.rpc.protocol.RpcMessage;
import org.momo.rpc.protocol.RpcResponse;

import java.util.concurrent.Callable;

/**
 * 重试策略
 */
@SPI
public interface RetryPolicy {

    RpcMessage<RpcResponse> doRetry(Callable<RpcMessage<RpcResponse>> callable) throws Exception;
}
